MarkLogic 9 Product Documentation
POST /manage/v2/packages/{pkgname}/servers/{name}

Summary

[DEPRECATED: use GET /manage/v3 and POST /manage/v3 instead.]

This resource address adds a server configuration to the named package (pkgname). The name of the server in the payload body is ignored and name is used as the name.

URL Parameters
group-id={group-id} The name or ID of the group to contain the named server. This parameter is required. (The group named in the payload body is ignored.)
format The format of the output. This can be either xml or json. By default, the format is xml.
modules Whether or not the modules associated with the server are added along with the server configuration to the package. Set to true to add the server modules, or false not to add the modules.
Request Headers
Accept The expected MIME type of the response. If the format parameter is present, it takes precedence over the Accept header.
Content-type The MIME type of the data in the request body, either application/zip, application/xml, or application/json.
Response Headers
Content-type The MIME type of the data in the payload body. Depending upon the value of the format parameter or Accept header, either application/xml or application/json.

Response

Upon success, MarkLogic Server returns status code 200 (OK). The response body contains the requested data.

Required Privileges

This operation requires the manage-admin role, or the following privilege:

http://marklogic.com/xdmp/privileges/manage

Example

 
      curl -o Oscars.xml --digest -u admin:admin \
      http://localhost:8002/manage/v2/servers/Oscars?view=package

      ==> Download the configuration of the 'Oscars' server to the Oscars.xml file.

      curl -X POST --digest -u admin:admin -H "Content-type: application/xml" -d @Oscars.xml \
      "http://localhost:8002/manage/v2/packages/test-package/servers/NewServer" 

      ==> Add the 'Oscars' server configuration, as 'NewServer.xml,' to the 
          "test-package" package.

    
Powered by MarkLogic Server | Terms of Use | Privacy Policy